<!DOCTYPE html>
<html lang="CN-ch">
    <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>举重</title>
    <script>
        function hide(){
            document.getElementById('mytc').style.display = 'none';
        }
		var a = 1;
        function action(){
			if(a === 1){a = 2;}
			else{a = 1;}
            document.getElementById("human").style.backgroundImage = 'url(./image/zhuhe' + a + '.png)';
        }
      </script>
    <style>
        html,body{
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        .container{
            max-width: 99%;
            position: relative;
            margin: 0 auto;
            text-align: center;
            height: 100vh;
            overflow: hidden;
            /*background-image: url("./image/yemain.png");*/
        }
        .bgimg{
            position: relative;
            width: inherit;
            height: inherit;
            background-image: url("./image/yemian.png");
        }
        .human{
            position: relative;
            width: inherit;
            height: inherit;
            background-image: url("./image/zhuhe1.png");

        }
        .tc{
            position: relative;
            width: inherit;
            height: inherit;
            background-image: url("./image/tanchuang0.png");
            display:flex;
            justify-content: center;
            align-items: center;
            animation: zoomIn 0.5s forwards;
        }

        @keyframes zoomIn {
            from {
              transform: scale(0.5);
            }
            to {
              transform: scale(1);
            }
          }
        
		/*.tc{
            width:300px;
            height: 200px;
            position: absolute;
            top: 50%; 
            left: 50%; 
            transform: translateX(-50%); 
            background-image: url("./image/tanchuang0.png");
            
			
		}
        .human{
            width:100px;
            height:200px;
            position: absolute;
            top: 45%; 
            left: 70%; 
            background-image: url("./image/tanchuang0.png");

        }*/
        
        #hideButton{
			position: fixed;
			top: 0;
			left: 38%;
			width: 33%;
			height: 20%;
			background-color: transparent; /* 设置按钮背景为透明 */
			border: none; /* 去掉按钮边框 */
			cursor: pointer; /* 鼠标悬停时显示指针 */

        }
    </style>
</head>
<body>
    <div class="container">

        <div class="bgimg">
            <button id="hideButton"  onclick="action()"></button>

            <div class="human" id="human">

                <div class="tc" id="mytc">
                选择举重物，点击人物，开始运动
                <button onclick="hide()">OK</button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>